<?php
session_start();

// includes
	include_once "newsample_connect.php";
	include_once "CFClass/CF_pdo_com.php";
	include_once "CFClass/CF_form_class.php";
	include_once "customers_fields.php";
	
// define custom class
	class FormClass extends CFform {
	
	
	}	
	
// Use class instance
	$TheForm = new FormClass($fieldspec, $testtable);
	$TheForm->set_name('customers');
	$TheForm->set_actionpage("customers_proc.php");
	$TheForm->set_selfpage("customers_edit.php");
	
// Get keyed row	
// Get keyed row	
	if($TheForm->get_keys()){
		$mode = 'Save';
	}else{
		$mode = 'New';
	}
		
	$qry_list = "SELECT * FROM customers WHERE 1  ";
	$qry_list .= $TheForm->make_keys_clause();
	print $qry_list;
	
	$array_list = get_array_query($qry_list);
	
	$TheForm->set_valuesarray($array_list);
	
		
	?>
	
	<html>
<head><title>cftest form</title>

<link rel="stylesheet" href="CFClass/commonctls.css" type="text/css">


</head>
<body>

<?php echo $TheForm->make_form('get',$mode); ?>

</body>
</html>